export function usePublicHooks() {
  // 业务类型
  const getBusinessTypeTag = (type: number, text = false) => {
    switch (type) {
      case 0:
        return text ? '其它' : 'lime'
      case 1:
        return text ? '新增' : 'blue'
      case 2:
        return text ? '修改' : 'purple'
      case 3:
        return text ? '删除' : 'orange'
    }
  }
  // 操作类型
  const getOperatorTypeTag = (type: number, text = false) => {
    switch (type) {
      case 0:
        return text ? '其它' : 'cyan'
      case 1:
        return text ? '后台' : 'lime'
      case 2:
        return text ? '客户端' : 'yellow'
    }
  }

  return {
    getBusinessTypeTag,
    getOperatorTypeTag
  }
}
